package com.tanglinkai.mall.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tanglinkai.mall.entity.po.Category;
import com.tanglinkai.mall.excpetion.BusinessException;

import java.util.List;

public interface CategoryService extends IService<Category> {
    /**
     * 添加分类
     */
    void addCategory(Category category);

    /**
     * 获取全部分类
     */
    List<Category> getAllCategories();

    /**
     * 根据ID获取分类
     */
    Category getCategoryById(Integer id);

    /**
     * 更新分类信息
     */
    void updateCategory(Category category) throws IllegalArgumentException;

    /**
     * 删除分类
     */
    void deleteCategory(Integer id) throws BusinessException;
}

